1. Field of the Invention
The present invention relates to an image-processing technique that outputs composite image data obtained by composing two or more pieces of image data, and particularly relates to an image-processing technique that displays image data so as to be translucently superimposed.
2. Description of the Related Art
Recently, displays that receive television broadcasts have become multi-functional. In order to perform various settings, for example, a menu screen containing still images is displayed on a display screen. Control that assists setting operations while changing the menu screen according to user operations from a display controller or a remote control is often performed. Furthermore, as the size of a display increases and television broadcast waves are digitalized, a plurality of different moving images, typical examples of which include television reception images, are simultaneously displayed on one display screen.
When a plurality of still images and moving images are simultaneously displayed on one display screen in this manner, display areas of the plurality of images may conflict with each other. That is to say, since the images are layered in the depth direction (hereinafter, referred to as a “Z direction”) on the display screen, the display areas of the images may be superimposed on each other. As a display method used in the case where display areas are superimposed on each other in this manner, there is a known method that gives a sense that an image is seen through another image. A method for composing pieces of image data in order to realize this sort of display method is referred to as alpha blending. When two or more pieces of image data are composed at a prescribed composite ratio, a plurality of images can be displayed so as to be superimposed at the degree of transmittance according to the composite ratio.
In alpha blending, a transmittance a indicating the degree of transparency at the time of composition is given to image data a that is displayed so as to be superimposed on another image. In a case where the image data a is composed with image data b displayed as the background, for example, translucent drawing is realized using Formulae 101 to 103 below for the color value data (R, G, B) of each pixel.R=R(a)·α+R(b)·(1−α)   (101)G=G(a)·α+G(b)·(1−α)   (102)B=B(a)·α+B(b)·(1−α)   (103)Where R refers to a color value of red, G refers to a color value of green, and B refers to a color value of blue. A color value is expressed in, for example, 8 bits, and may be an integer of 0 or more and 255 or less. Furthermore, (R(a), G(a), B(a)) is the color value data of the image data a. (R(b), G(b), B(b)) is the color value data of the background image data b. Each piece of color value data is obtained by subjecting image data to rendering.
Furthermore, the transmittance α is any value within the range of 0≦α≦1, wherein the data of an image that is superimposed on another image is completely transparent if α=0, and data of an image that is superimposed on another image is completely opaque if α=1.
Various methods have been already proposed for image composition using this alpha blending (Japanese Patent Laid-Open Nos. 2001-285745 and 2006-106989).
Furthermore, in the case where three or more pieces of image data are composed, Formulae 101 to 103 are repeatedly used to calculate the color value data of each pixel. That is to say, image data is sequentially taken as I0, I1, I2 . . . from the image data disposed rearmost in the Z direction of the display. First, the image data I0 is taken as background image data b and the image data I1 is taken as image data a that is superimposed thereon, to be used in Formulae 101 to 103 as above. Then, image data having the calculated color value data is taken as new background image b and the image data I2 is taken as image data a that is superimposed thereon, to be used in Formulae 101 to 103.
Following the above-described procedure, in the case where three or more pieces of image data are composed, composition is successively performed in the arranged order in the Z direction of the display (hereinafter, referred to as a “Z order”). Accordingly, until composition of a series of pieces of image data arranged as the background of given image data completely ends, the image data cannot be composed. Such rendering that calculates color value data based on image data requires a certain amount of time. Accordingly, the time necessary to obtain one composite image includes the time that is obtained by simply adding the time for rendering the number of still images that are superimposed and the time for rendering the number of moving images that are superimposed. As a result, there is a problem in that the frame rate is lowered.
Techniques for solving the above-described problem are also proposed. In the technique disclosed in Japanese Patent Laid-Open No. H06-335022, output by a still image-creating unit that processes a drawing command and output by a video data-creating unit that outputs video data are switched and output based on transmittance data contained in the drawing command. Accordingly, composition can be performed at a high speed. Furthermore, in the technique disclosed in Japanese Patent Laid-Open No. H07-072850, a frame buffer for moving images and a frame buffer for still images are completely separated, and images are superimposed by the control of a window system.
However, the above-described techniques are problematic in that they need a memory area for holding the color value data of each pixel for all pieces of image data that are to be superimposed.
Furthermore, in order to reduce memory usage, a technique is conceivable in which the rendering results of still images are superimposed in a common memory area and output. In this technique, the only memory area necessary to obtain superimposition results for a plurality of pieces of still image data after rendering is just the area necessary for one piece of image data. However, for example, in the alpha blending of a group consisting of a series of pieces of image data in which still images and moving images are arranged so as to be alternately superimposed, the Z order and the image data composite order do not match. Accordingly, correct composite image data cannot be obtained.